-- Leviathan (c) v.v.balashoff
local Class = require('leviathan/Class')

local MusicComponent = Class:derive('MusicComponent')

function MusicComponent:new(track)
    self.id = 'MusicComponent'
    self.typeId = 'Audio'
    self.drawable = false
    self.enabled = true

    local a = world:getManager('AudioManager')
    local f = a:getAudio(track)
    self.name = f.name
    self.path = f.path
    self.audio = love.audio.newSource(f.file, 'static')
    self.audio:setLooping(true)
    self.status = nil
end

return MusicComponent
